<template>
	<view class="app" :style="'background:'+bgdata.bg_color">
		<jnavbar :title="'会员中心'" :bgdata="bgdata"></jnavbar>
		<!-- <slist @onRefresh="onRefresh" class="page_container tab_page_container" ref="slist"> -->
		<block v-for="(item, i) in list" :key="i"><renovation :mydata="item.data"></renovation></block>
		<common></common>
		<trolley></trolley>
		<nloading></nloading>
		<floatmenu page_id="8"></floatmenu>
	</view>
</template>
<script>
import renovation from '@/components/renovation/index.vue';
import http from '@/common/http.js';
import {mapState} from 'vuex';

export default {
	data() {
		return {
			list: [],
			page: 1,
			bgdata: {}
		};
	},
	components: {
		renovation
	},

	onReachBottom() {
		this.page++;
		this.$store.commit('settouch', this.page);
	},
	async onLoad() {
		await this.$getWx
		this.getConfiguration();
	},
	methods: {
		getConfiguration() {
			this.$http('/configuration/memberLevel', {}, 'get').then(res => {
				if (res.statusCode == 200) {
					let data = res.data.msg;
					if (data.is_open == 1) {
						this.list = data.list;
					}
					this.bgdata = data.page_config;
				}
			});
		}
	}
};
</script>

<style lang="scss">
	.app{
		min-height: 100vh;
	}
.merge_div {
	display: flex;
	justify-content: space-between;
	width: 696rpx;
	height: 100rpx;
	background: linear-gradient(-90deg, #ffecd2, #fbeede);
	border-radius: 14rpx;
	align-items: center;
	margin: 20rpx 27rpx;
	padding: 23rpx;

	.merge_left {
		display: flex;
		align-items: center;

		.image {
			width: 37rpx;
			height: 37rpx;
		}

		.view {
			display: flex;
			flex-direction: column;
			margin-left: 22rpx;

			text:first-child {
				font-size: 30rpx;
				font-family: 59--Regular;
				font-weight: bold;
				color: #c79b57;
			}

			text:last-child {
				font-size: 18rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #dbb283;
			}
		}
	}

	.merge_btn {
		width: 138rpx;
		height: 44rpx;
		background: linear-gradient(-90deg, #f3c176, #f8debc);
		border-radius: 22rpx;
		text-align: center;
		line-height: 44rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #7d5213;
		margin-right: 20rpx;
	}
}
</style>
